﻿// //------------------------------------------------------------------------------
// // <copyright file="" company="Dascoba Development">
// //  Copyright © Dascoba Development 2010
// // </copyright>
// //------------------------------------------------------------------------------
namespace Dascoba.Umb.FileManager.Support
{
    using System;
    using System.Web;

    using umbraco;

    public static class Constants
    {
        #region Pathing/Urls

        /// <summary>
        ///   The file manager local path under /umbraco
        /// </summary>
        public const string FileManagerFolderName = "filemanager";

        /// <summary>
        ///   /umbraco_client
        /// </summary>
        public const string UmbracoClientUrl = "/umbraco_client";

        /// <summary>
        ///   Name for recycle bin folders (default: fmRecycle)
        /// </summary>
        public const string RecycleBinFolderName = "fmRecycle";

        /// <summary>
        ///   Name for recycle bin config file (default: fmRecycle.xml)
        /// </summary>
        public const string RecycleBinConfigName = "fmRecycle.xml";

        /// <summary>
        ///   Application Root Url
        /// </summary>
        public static readonly string ApplicationRootUrl = HttpContext.Current.Server.MapPath("~").Trim(new[] { '\\' });

        /// <summary>
        ///   The file manager global url.
        /// </summary>
        public static readonly string FileManagerGlobalUrl = String.Format(
            "{0}/{1}", GlobalSettings.Path, FileManagerFolderName);

        #endregion

        #region Icons

        public static readonly string FolderTreeIcon = String.Format(
            "../../{0}/images/folder.png", FileManagerFolderName);

        public static readonly string FolderTreeIconUmb = String.Format(
            "../../{0}/images/folder_umb.png", FileManagerFolderName);

        public static readonly string BinTreeIcon = String.Format("../../{0}/images/bin.png", FileManagerFolderName);

        public static readonly string BinTreeIconClosed = String.Format(
            "../../{0}/images/bin_closed.png", FileManagerFolderName);

        public static readonly string SuccessIcon = String.Format("{0}/images/success.png", FileManagerGlobalUrl);

        public static readonly string FailureIcon = String.Format("{0}/images/fail.png", FileManagerGlobalUrl);

        #endregion
    }
}